<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/WEB-INF/context/commonTags.jsp"%>
<div class="easyui-layout" fit="true">
	<div region="center" style="padding: 1px;">
		<t:datagrid name="roleList" title="角色列表" actionUrl="/roleController?role" idField="id" fit="true" queryMode="group">
			<t:dgCol title="编号" field="id" hidden="false"></t:dgCol>
			<t:dgCol title="角色" field="role" query="true"></t:dgCol>
			<t:dgCol title="描述" field="description" query="false" ></t:dgCol>
			<t:dgCol title="是否有效" field="available" query="true" ></t:dgCol>
 			<t:dgCol title="操作" field="opt" width="100"></t:dgCol>
 			<t:dgFunOpt title="权限设置" funname="setfunbyrole(id,role)"/>
			<t:dgToolBar title="编辑" icon="icon-edit" url="" funname="update"></t:dgToolBar>
		</t:datagrid>
	</div>
</div>
<div region="east" style="width: 400px;" split="true">
<div tools="#tt" class="easyui-panel" title="权限设置" style="padding: 10px;" fit="true" border="false" id="function-panel"></div>
</div>
<div id="tt"></div>
</div>

<script type="text/javascript">
function setfunbyrole(id,role) {
	$("#function-panel").panel(
		{
			title :role+":当前权限",
			href:"roleController?fun&roleId=" + id
		}
	);
	$('#function-panel').panel("refresh" );
	
}
</script>